package cn.laixueit;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.HashMap;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AmqpApp.class)
public class Demo {

    @Autowired
    private AmqpTemplate amqpTemplate;

    @Test
    public void t(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("phone",110);
        map.put("code",123);
        amqpTemplate.convertAndSend("","test_que",map);
    }
}
